package com.leemz.spring.factory;

/**
 * 用户服务实现类
 * @author leemz
 */
public class UserServiceImpl implements UserService {

    //private UserDao userDao = (UserDao) BeanFactory.getBean("userDao");
    /**
     * 使用spring来注入userDao对象
     */
    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void regester(User user) {
        userDao.register(user);
    }

    @Override
    public void login(String name, String password) {
        userDao.login(name, password);
    }
}